<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Bootstrap 实例 - 条纹表格</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
    .box{
        width: 800px;
    }
</style>
</head>
<body>
<div class="box">
<table class="table table-striped">
    <thead>
    <tr>
        <th>ID</th>
        <th>素材标题</th>
        <th>价格</th>
        <th>访问量</th>
    </tr>
    </thead>
    <tbody>
    {foreach $data as $val}
    <tr>
        <td>{$val['g_id']}</td>
        <td><a href="{:url('/showDetail',['g_id'=>$val['g_id']])}">{$val['name']}</a></td>
        <td>{$val['price']}</td>
        <td>{$val['num']}</td>
    </tr>
    {/foreach}
    </tbody>
</table>
</div>
{$data|raw}
</body>
</html>